//
//  L2Tab3.m
//  Lesson2
//
//  Created by Alexander Trifonov on 20.04.12.
//  Copyright (c) 2012 fgengine@gmail.com. All rights reserved.
//

#import "L2Tab3.h"

@implementation L2Tab3

- (void) loadView
{
    [super loadView];
    [self load:nil];
}

- (IBAction)load:(id)sender
{
    NSUserDefaults* user = [NSUserDefaults standardUserDefaults];
    login.text = [user objectForKey:@"login"];
    password.text = [user objectForKey:@"password"];
}

- (IBAction) execute:(id)sender
{
    NSUserDefaults* user = [NSUserDefaults standardUserDefaults];
    [user setObject:login.text forKey:@"login"];
    [user setObject:password.text forKey:@"password"];
    [user synchronize];
}

- (void)dealloc {
    [login release];
    [password release];
    [super dealloc];
}

- (void)viewDidUnload {
    [login release];
    login = nil;
    [password release];
    password = nil;
    [super viewDidUnload];
}

@end
